<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('manage/domainList')}">域名列表</a></li>
			<!-- <li><a href="{:url('fbfans/add')}">添加粉丝页管理列表</a></li> -->
		</ul>
        <form class="well form-inline margin-top-20" method="post" action="{:url('manage/domainList')}">
            查询域名:
            <input type="text" class="form-control" name="domainname" style="width: 180px;" value="{:input('request.domainname/s','')}" placeholder="域名">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('manage/domainList')}">清空</a>
        </form>

		<form class="well form-inline margin-top-20" method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('manage/domainExcelAdd')}">
			<div class="form-group">
				 <input id="excel-1" type="hidden" name="excel_url" >
				 <input  id="excel-1-name" type="text" name="excel_name" placeholder="导入表格名称" class="form-control"  style="widtd: 120px;">
				 <a style="padding: 7px 8px;" href="javascript:uploadOne('Excel上传','#excel-1','file');" class="btn btn-sm btn-primary btn-danger">选择上传文件</a>
			</div>
			<div class="form-group">
			  <div class="col-sm-offset-2 col-sm-10">
				 <button type="submit" class="btn btn-primary js-ajax-submit">导入</button>
			  </div>
			</div>
		</form>

		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th>id</th>
					<th>域名</th>
					<th>子域名</th>
					<th>分组</th>
					<th>站长</th>
					<th>更换站长</th>
					<th>域名购买平台</th>
					<th>平台账号</th>
					<th>创建时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody id='llltbody'>
				<foreach name="domains" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.domain}</td>
					<td>{$vo.sub_domain }</td>
					<td>{$vo.group }</td>
					<td>{$vo.stationmaster}</td>
					<td class="lllclick">{$vo.change_master}</td>
					<td>{$vo.buy_platform}</td>
					<td>{$vo.platform_account}</td>
					<td>{$vo.create_time|date="Y年m月d日",###}</td>
					<td>
						<a href='{:url("manage/editdomain",array("id"=>$vo.id))}'>{:lang('EDIT')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script type="text/javascript">
		// Event delegation
		var tbody = document.getElementById("llltbody");
		tbody.onclick = function(event){
			eTarget = event.target;
			if((eTarget.nodeName.toLowerCase()=='td')&&(eTarget.className=="lllclick")){
				var theId = eTarget.parentNode.firstElementChild.innerHTML;
				// console.log(theId);
			}
		}
	</script>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
